import request from '@/utils/request'

export default {
  getMessages(messagePageRequest) {
    return request({
      url: '/teacher/message/list',
      method: 'post',
      data: messagePageRequest
    })
  },
  setRead(messageid) {
    return request({
      url: '/teacher/message/read/' + messageid,
      method: 'put'
    })
  },
  getCurrentTeacher() {
    return request({
      url: '/teacher/info',
      method: 'get'
    })
  },
  updateCurrentTeacher(teacher) {
    return request({
      url: '/teacher/info',
      method: 'put',
      data: teacher
    })
  },
  restCurrentTeacherPassword(passwordRequest) {
    return request({
      url: '/teacher/p',
      method: 'put',
      data: passwordRequest
    })
  }
}
